package com.filter.control.common;


/**
 * 返回结果枚举类
 *
 * @author cheer
 */
public enum ResultEnum {

    SUCCESS(200, "请求成功"),
    BAD_REQUEST(400, "参数不合法"),
    UNAUTHORIZED(401, "用户未登录或已超时"),
    UNAUTHORIZED_ACT_TEA(40401, "用户未登录或已超时"),
    UNAUTHORIZED_ACT_STU(40402, "用户未登录或已超时"),
    FORBIDDEN(403, "用户没有执行该请求的权限"),
    NOT_FOUND(404, "内容不存在"),
    SERVER_ERROR(500, "服务器内部错误"),
    SYSTEM_BUSY(1000, "系统繁忙，请稍后再试"),
    LICENSE_EXPIRE(2000, "License过期"),
    PROGRESS(3000, "进度展示"),

    // 删除处理异常
    DELETE_DEAL_EXCEPTION(501, "删除处理异常"),
    REPEAT_EXCEPTION(4000, "重复异常"),

    // 业务异常
    // 实验模块
    FILE_UPLOAD_ERROR(500106, "文件上传异常"),
    IMAGE_IS_ALLOCATED(500400, "镜像正在被使用，强制删除镜像会导致使用该镜像的容器、相关的镜像分配立即删除，请谨慎操作"),
    CHECK_ERROR(500401, "评测未通过"),
    TIME_ERROR(500402, "不在时段"),
    PAY_LIMIT(500403, "需要付费"),
    QUEUEING(500404, "正在排队"),
    QUEUED(500405, "排队成功提醒"),
    IN_EXPERIMENT(500406, "已经在实验中"),

    // 第三方登录
    WEIXIN_QRCODE_INVALID(500501, "二维码失效"),
    WEIXIN_QRCODE_INIT(500502, "用户未扫描二维码"),
    WEIXIN_QRCODE_FAILED(500503, "微信登录异常"),
    WEIXIN_NOT_FOLLOWED(500504, "请先关注公众号"),

    // 用户模块
    LOGIN_FAILED(100100, "登录失败"),
    USER_INFO_MATCH_FAILED(100101, "用户名或密码错误"),
    VERIFICATION_CODE_ERROR(100102, "图形验证码错误"),
    ACCOUNT_NOT_EXIST(100103, "账号不存在"),
    ACCOUNT_EXPIRED(100104, "账号已过期"),
    USER_EXIST(100105, "用户已存在"),
    DELETE_USER_COURSE(100110, "你已加入该班级的课程，若再次加入会将之前班级个人记录清除。"),
    SMS_CODE_ERROR(100107, "短信验证码错误"),
    SMS_CODE_SEND_FAIL_ERROR(100108, "短信验证码发送频繁，请于%s分钟后重试"),
    PASSWORD_ERROR(100108, "密码不能为空"),

    USER_LEARN_HISTORY_MIGRATION(200001, "用户学习记录迁移"),

    // 课程
    COURSE_NOT_OWNER(100106, "当前课程不属于自己的课程"),
    CLASS_NOT_PASS(100109, "暂无审批记录"),
    COURSE_NOT_FOUND(100111, "当前课程有误，请退出到首页重新操作。"),


    // 导出excel
    EXCEL_OUTPUT_EXCEPTION(500600, "导出excel失败"),

    FILE_DOWNLOAD_ERROR(500700, "远程文件下载失败");

    private Integer code;

    private String message;

    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
